Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add yarn tool with support for basic commands #1151

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

stijnwop
Copy link

@stijnwop stijnwop commented Apr 12, 2023

We've (in our company) been using Nuke Tool for Yarn in our build stack for quite some time, since I just saw the open request (#1145) I thought why not open a PR.

public interface IYarn : INukeBuild
{
    AbsolutePath SourceDirectory => RootDirectory / "app";

    Target Lint => _ => _
        .Executes(() =>
        {
            YarnTasks.YarnRun(o => o
                .SetCommand("lint")
                .SetArguments("--no-fix")
                .SetProcessWorkingDirectory(sourceDirectory));
        });
 
    Target Install => _ => _
        .Executes(() =>
        {
            YarnTasks.YarnInstall(o => o.SetProcessWorkingDirectory(SourceDirectory));
        });

    Target Build => _ => _
        .DependsOn(Install)
        .Executes(() =>
        {
            YarnTasks.YarnRun(o => o
                .SetCommand("build")
                .SetArguments("--production")
                .SetProcessWorkingDirectory(SourceDirectory));
        });
}

I confirm that the pull-request:

  • Follows the contribution guidelines
  • Is based on my own work
  • Is in compliance with my employer

@stijnwop stijnwop changed the title #1145: Add yarn tool with support for basic commands Add yarn tool with support for basic commands Apr 12, 2023
@jafin
Copy link

jafin commented Apr 14, 2023

Need one of these for pnpm as well. :) Guessing I can just clone this pr for pnpm...

@matkoch matkoch force-pushed the develop branch 2 times, most recently from 1f97cf9 to 6cac30e Compare April 23, 2023 15:13
@matkoch matkoch force-pushed the develop branch 4 times, most recently from 3d33ebb to f0637b8 Compare May 6, 2023 18:27
@matkoch matkoch linked an issue May 7, 2023 that may be closed by this pull request
@matkoch matkoch added this to the v7.1.0 milestone May 7, 2023
@matkoch matkoch force-pushed the develop branch 6 times, most recently from 7f44bf5 to a82ac59 Compare May 15, 2023 21:37
@ITaluone
Copy link
Contributor

ITaluone commented May 23, 2023

@stijnwop Do you mind adding the --silent parameter? :)

Like yarn --silent install or yarn --silent run xxx

@IT-VBFK
Copy link

IT-VBFK commented Jan 6, 2024

@stijnwop Did you gave up on this? This would be a great addition.

@stijnwop
Copy link
Author

@IT-VBFK No, but it depends on when this will be approved and used by the code owner..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for yarn
5 participants